//面试题 16.15. 珠玑妙算
int* masterMind(char* solution, char* guess, int* returnSize)
{
    
    *returnSize=2;
    int *ret=(int*)malloc(sizeof(int)*2);
    ret[0]=0;
    ret[1]=0;
    for(int i=0;i<4;i++)
    {
        if(solution[i]==guess[i])
        {
            ret[0]++;
            solution[i]=0;
            guess[i]=0;
        }
    }
    for(int i=0;i<4;i++)
    {
        if(solution[i]==0)
        continue;
        for(int k=0;k<4;k++)
        {
            if(solution[i]==guess[k])
            {
                ret[1]++;
                guess[k]=0;
                break;
            }
        }
    }
    return ret;

}